//
//  AppConfig.m
//  ArtCircle
//
//  Created by sunbin on 2017/5/18.
//  Copyright © 2017年 Quanli. All rights reserved.
//

#import "AppConfig.h"

@implementation AppConfig
single_implementation(AppConfig);

- (void)globalSettings {
    
    
    [self iqKeyboardManager];
    
    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60)
                                                         forBarMetrics:UIBarMetricsDefault];
    
    if ([UIDevice currentDevice].systemVersion.floatValue >= 7.0) {
        

        [[UINavigationBar appearance] setBarTintColor:kRGBAColor(30, 167, 252, 1)];
        
        [[UINavigationBar appearance] setTitleTextAttributes:
         [NSDictionary dictionaryWithObjectsAndKeys:kRGBAColor(245, 245, 245, 1), NSForegroundColorAttributeName, [UIFont systemFontOfSize:15.f], NSFontAttributeName, nil]];
    }
}


- (void)iqKeyboardManager {

    IQKeyboardManager *manager = [IQKeyboardManager sharedManager];
    manager.enable = YES;
    manager.shouldResignOnTouchOutside = YES;
    manager.shouldToolbarUsesTextFieldTintColor = YES;
    
    manager.keyboardDistanceFromTextField = 85.f;
    
    manager.enableAutoToolbar = NO;
    
    if ([manager canGoNext]) {
        [manager goNext];
    } else {
    }

}





@end
